<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Link Details</f:facet>


        <s:decorate id="destination" template="layout/display.xhtml">
            <ui:define name="label">Destination</ui:define>
            <h:outputText value="#{linkHome.instance.destination}"/>
        </s:decorate>

        <s:decorate id="name" template="layout/display.xhtml">
            <ui:define name="label">Name</ui:define>
            <h:outputText value="#{linkHome.instance.name}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/LinkEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty linkFrom ? 'LinkList' : linkFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Folder bean</h:panelGroup>
        </f:facet>
    <div class="association" id="folderBeanParent">

        <h:outputText value="There is no folderBean associated with this link."
                   rendered="#{linkHome.instance.folderBean == null}"/>

        <rich:dataTable var="_folder"
                   value="#{linkHome.instance.folderBean}"
                rendered="#{linkHome.instance.folderBean != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="folderBeanTable">
            <h:column>
                <f:facet name="header">Id folder</f:facet>
                <h:outputText value="#{_folder.idFolder}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Foldername</f:facet>
                <h:outputText value="#{_folder.foldername}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewfolder"
                     value="View"
                      view="/Folder.xhtml">
                    <f:param name="folderIdFolder"
                           value="#{_folder.idFolder}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
